<div class="special_box">
  <div class="special_box_top"></div>
  <div class="special_box_middle stages_box">
    <% if @project.stages.count > 0 %>
      <p><strong>Choose a stage:</strong></p>
      <% for stage in @project.stages %>
          <p><%= link_to h(stage.name), project_stage_path(@project, stage), :class => 'arrow_link'  %></p>
      <% end %>
    <% else %>  
      <p><strong>No stage configured yet</strong></p>
      <%= link_to 'New stage', new_project_stage_path(@project), :class => 'arrow_link' %>
    <% end %>
  </div>
  <div class="special_box_bottom"></div>
</div>

<div class="box">
  <div class="box_top"></div>
  <div class="box_middle">
		<p>
		<b>Description:</b>
		  <%=h @project.description %>
		</p>
		<p>
		  <b>Project Type:</b>
		  <%=h @project.template %>
		</p>
		<p>
    <b>#Deployments:</b>
	  <%=h @project.deployments.count %>
 		</p><br />
  	<%= link_to 'Edit project', edit_project_path(@project), :class => 'arrow_link' %> | 
	  <%= link_to 'Clone project', clone_form_path(@project), :class => 'arrow_link' %> | 
 		<%= link_to 'Delete project', project_path(@project), :confirm => 'Are you sure?', :method => :delete, :class => 'arrow_link' %>
  </div>
  <div class="box_bottom"></div>
</div>

<div class="clear"></div>
<br>

<fieldset class="fieldset">
  <legend>Project configuration</legend>
  <%= render(:partial => 'configs')%>
  <br />
  <%= link_to 'New configuration', new_project_project_configuration_path(@project), :class => 'arrow_link' %>
</fieldset>

<br /><br />

<fieldset class="fieldset">
  <legend>Stages</legend>
  <%= render(:partial => 'stages')%>
  <br />
  <%= link_to 'New stage', new_project_stage_path(@project), :class => 'arrow_link' %>
</fieldset>

<br /><br />

<fieldset class="fieldset">
  <legend>Recent Deployments</legend>
  <%= render(:partial => 'deployments')%>
  <br />
</fieldset>

<% content_for(:breadcrumb) do %>
  <% breadcrumb_box do %>
    <%= link_to "Manage projects", projects_path, :style => "float:right", :class => "arrow_link" %>
    <%= link_to "Projects", projects_path %> &gt; 
    Project <%= link_to current_project.name, project_path(current_project) %> 
  <% end %>
<% end %>

<% content_for(:page_title) do %>
  <% @page_title = "Project #{h(current_project.name)}" %>
  <h2>Project <%= link_to h(current_project.name), project_path(current_project) %></h2>
<% end %>
